package org.homeworkadmin.admin.service.impl;

import org.homeworkadmin.admin.domain.Admins;
import org.homeworkadmin.admin.mapper.AdminsMapper;
import org.homeworkadmin.admin.service.AdminsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminsServiceImpl implements AdminsService {
    @Autowired
    private AdminsMapper adminsMapper;



    @Override
    public List<Admins> get(Integer adminId,String adminAccount,String adminPassword, String adminName, String adminIdcard, String adminPhone,int pagesize,int currpage) {
        return adminsMapper.get( adminId,adminAccount,adminPassword,adminName,adminIdcard,adminPhone,pagesize,currpage);
    }

    @Override
    public int getCount(String adminAccount, String adminName,String adminPhone) {
        return adminsMapper.getCount(adminAccount,adminName,adminPhone);
    }


    @Override
    public int insert(Admins admins) {
        return adminsMapper.insert(admins);
    }

    @Override
    public int update(Admins admins) {
        return adminsMapper.update(admins);
    }

    @Override
    public int delete(Long adminId) {
        return adminsMapper.delete(adminId);
    }


}
